<!DOCTYPE html>

<html>
<head>
  <style>
    body {
      overflow: hidden;
    }
    .container {
      margin-left: 50px;
      height: 100px;
      width: 100px;
      will-change: transform;
      transform: translate3d(-50%, 0, 0);
    }
    
    .box {
      position: absolute;
      top: 0;
      height: 100px;
      width: 100px;
      overflow: hidden;
      background-color: green;
    }
    
    #indicator {
      position: absolute;
      top: 8px;
      left: 8px;
      width: 200px;
      height: 100px;
      background-color: red;
    }
    
    #layers {
      opacity: 0; /* hide from pixel result */
    }
  </style>
  <script>
    if (window.testRunner)
      testRunner.dumpAsTextWithPixelResults();

    function dumpLayers()
    {
      if (window.testRunner)
        document.getElementById('layers').innerText = internals.layerTreeAsText(document);
    }

    window.addEventListener('load', dumpLayers, false);
  </script>
</head>
<body>
  <!-- You should see a green rectangle, and no red. -->
  <div id="indicator"></div>
  <div class="container">
    <div class="box" style="transform: translateX(0)"></div>
    <div class="box" style="transform: translateX(100%)"></div>
  </div>
<pre id="layers">Layer tree goes here in DRT</pre>
</body>
</html>
